package com.ljh.lottery.service.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author: Themberfue
 * @date: 2025/4/13 21:37
 * @description:
 */
@AllArgsConstructor
@Getter
public enum ActivityStatusEnum {
    RUNNING(1, "活动进行中"),

    COMPLETED(2, "活动已完成");

    private final Integer code;

    private final String message;

    public static ActivityStatusEnum forName(String name) {
        for (ActivityStatusEnum activityStatusEnum: ActivityStatusEnum.values()) {
            if (name.equalsIgnoreCase(activityStatusEnum.name())) {
                return activityStatusEnum;
            }
        }
        return null;
    }
}
